card and mcp updates - #1444
Conversation
🦋 Changeset detectedLatest commit: e6c5244 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🟢 No design token changes found |
🟢 Unit test coverage changes foundUnit test coverage has been updated through this PR. Changes: 0 new tests, 0 removed tests, 1 improved, 0 decreased
|
🟢 Bundle size report
|
There was a problem hiding this comment.
Pull request overview
This PR removes obsolete Card APIs/visual effects in @primer/react-brand and updates the Brand MCP guidance + review rules to better enforce page-width gridline framing and calmer typography defaults in component-owned text.
Changes:
- Removed
Card.disableAnimationand the retiredCardSkewEffect, updating stories, tests, CSS, docs, and visual snapshots accordingly. - Updated MCP “page design” + “examples” tool text to emphasize page-width outer frames for horizontal gridlines, and adjusted catalog generation to prefer focused “Gridline” stories.
- Added a new
primer_brand_reviewrule warning on unnecessarysizeoverrides for component-owned text (e.g.Card.Heading size=...).
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/Statistic/Statistic.examples.stories.tsx | Removes disableAnimation usage from a Card example. |
| packages/react/src/river/RiverBreakoutTabs/RiverBreakoutTabs.examples.stories.tsx | Conditionally disables backgroundVisual when NODE_ENV === 'test'. |
| packages/react/src/river/RiverBreakout/RiverBreakout.features.stories.tsx | Removes disableAnimation usage from a Card example. |
| packages/react/src/Card/index.ts | Stops exporting CardSkewEffect. |
| packages/react/src/Card/CardSkewEffect.tsx | Removes the CardSkewEffect implementation. |
| packages/react/src/Card/Card.visual.spec.ts-snapshots/Visual-Comparison-Card-Card-Arrow-CTA-with-long-label-focus-1-darwin.png | Updates visual snapshot artifact for Card focus state. |
| packages/react/src/Card/Card.visual.spec.ts | Renames the visual test title for the focus story (no longer “animation disabled”). |
| packages/react/src/Card/Card.tsx | Removes disableAnimation prop support and the corresponding class toggle. |
| packages/react/src/Card/Card.test.tsx | Removes unit tests asserting Card--disableAnimation behavior. |
| packages/react/src/Card/Card.stories.tsx | Removes disableAnimation control from Storybook Playground. |
| packages/react/src/Card/Card.module.css.d.ts | Removes typings for deleted CSS module class names. |
| packages/react/src/Card/Card.module.css | Removes Card--disableAnimation and Card--skew styles. |
| packages/react/src/Card/Card.features.stories.tsx | Removes disableAnimation story plumbing and related play assertions/content. |
| packages/mcp/src/tools/primer-brand-page-design/primer-brand-page-design.ts | Updates tool description to stress page-width gridline framing. |
| packages/mcp/src/tools/primer-brand-page-design/primer-brand-page-design.test.ts | Updates expectations to match new page-design guidance content. |
| packages/mcp/src/tools/primer-brand-examples/primer-brand-examples.ts | Updates tool description to preserve page-width outer frames. |
| packages/mcp/src/tools/primer-brand-examples/primer-brand-examples.test.ts | Adds assertion for updated description text. |
| packages/mcp/src/review/rules.ts | Adds component-text-default-size review rule. |
| packages/mcp/src/review/rules.test.ts | Adds tests for the new rule + catalog example expectations. |
| packages/mcp/scripts/generate-catalog.mjs | Prefers an exact Gridline story when selecting canonical examples. |
| packages/mcp/content/page-design.md | Expands/clarifies gridline framing guidance + typography sizing guidance. |
| apps/storybook/static/locales/pt-BR/Card.json | Removes disable_animation_label string. |
| apps/storybook/static/locales/ja/Card.json | Removes disable_animation_label string. |
| apps/storybook/static/locales/fr/Card.json | Removes disable_animation_label string. |
| apps/storybook/static/locales/es/Card.json | Removes disable_animation_label string. |
| apps/storybook/static/locales/en/Card.json | Removes disable_animation_label string. |
| apps/storybook/static/locales/de/Card.json | Removes disable_animation_label string. |
| apps/next-docs/content/components/Card/react.mdx | Removes disableAnimation documentation and prop-table entry. |
| .changeset/remove-card-skew-effect.md | Announces CardSkewEffect removal (@primer/react-brand minor). |
| .changeset/remove-card-animation-prop.md | Announces disableAnimation removal (@primer/react-brand minor). |
| .changeset/connect-gridlines-to-page-edges.md | Announces MCP gridline guidance updates (@primer/brand-mcp patch). |
| .changeset/calm-component-text-sizes.md | Announces MCP typography guidance + review rule (@primer/brand-mcp patch). |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 30/36 changed files
- Comments generated: 1
- Review effort level: Lite
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
Summary
Towards https://github.com/github/brand-experience/issues/248
Updates card and gridline MCP tool guidance as agents are frequently implementing them wrong.
Also adds a pointer to Agent.md file in the
primer_brand_setuptool for better docs reading experience.List of notable changes:
Contributor checklist:
update snapshotslabel to the PR)Reviewer checklist:
Screenshots:
N/A